{:W('Nav',array('name'=>'角色配置'))}
<link href="__PUBLIC__/Js/js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<!-- 订单列表 -->
    <div class="list-div" id="listDiv">
        <form action="runRelationRole" method="post">
            <input type="hidden" name="id" value="{$id}">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>编号</th>
                <th>角色名称</th>
                <th>角色描述</th>
                <th>权限</th>
            </tr>
            <foreach name="roleArr" item="v">
                <tr>
                    <td><input type="checkbox" name="role_id[]" value="{$v.id}" <if condition="$v['relation'] ">checked</if>>{$v.id}</td>
                    <td>{$v.name}</td>
                    <td>{$v.remark}</td>
                    <td><a href="access?id={$v.id}">查看</a></td>
                </tr>
            </foreach>
        </table>

<input type="submit" value="保存修改" style=" height: 30px;width: 80px;;display: block;margin: 20px auto; cursor: pointer"/>
        </form>
        <!--遮罩-->
    </div>

<script language="JavaScript">
    function sure($id){
        var xmlhttp = new XMLHttpRequest();
        var act = "{:U(GROUP_NAME.'/Order/sureOrder')}";
        xmlhttp.open("POST", act, false);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send("id=" + $id);
        if (xmlhttp.responseText == true) {
            document.getElementsByName($id)[0].innerText='已确认';
            document.getElementsByName('sure_'+$id)[0].innerText=' ';
        } else {
            alert('传输错误，请稍后重试');
        }
    }
</script>


</body>
</html>